/**
 * Copyright 2021 Inc.
 **/
package com.myz.distributed.transaction.rocketmq.common;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author maoyz0621 on 2021/5/21
 * @version v1.0
 */
@Repository
public interface TransferRecordRepository extends JpaRepository<TransferRecordEntity, Long> {

    @Query(value = "select count(*) from transfer_record u where u.transaction_id = ?1", nativeQuery = true)
    int getTransferRecordEntitiesByTransactionId(String transactionId);
}